Repository navigation
fix(agents): keep the target's path when its last agent goes, for every target - #522
Merged
Merged
Conversation
…ry target delete_agent in mode commit that empties agent-manager/ adds .gitkeep to the path above it when that path has no kustomization.yaml and no .gitkeep in git, for every target: an organization's content path, another Kustomization's path, and a path the caller names. The content-path mark and its ServiceAccount read of the organization namespace go. Part of #502
Published Helm chart
|
| Chart | agent-manager |
| Version | 4.1.3-rf94c02f8t20261201180225hea6a866 |
| OCI reference | oci://gsoci.azurecr.io/charts/giantswarm/agent-manager:4.1.3-rf94c02f8t20261201180225hea6a866 |
| Digest | sha256:94e3fa06f6d754553b299b27243de595e5c91c887894b493de853afc8c7e5627 |
| Registry | public — gsoci.azurecr.io |
| Git catalog | giantswarm-test-catalog (index) |
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-manager --version 4.1.3-rf94c02f8t20261201180225hea6a866Posted by architect-orb · build 14156 · commit ea6a866 · updated in place on every push
3 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #502
Problem
delete_agentin mode commit of the last agent removesagent-manager/. When the path above it (the target's path, which a Flux Kustomization builds) has nokustomization.yamland no other file, git keeps no empty directory, so the merge removes the path. The Kustomization then fails with "kustomization path not found" before it prunes, so the agent's HelmRelease stays and no later change of that path is applied.#520 fixed this for an organization's content path only. Two targets were still open:
repository,branchandpath, also when it is an organization's content path.Change
keepTargetPath(internal/agents/commit.go, fromagentCommit.open) now runs for every target: a write that emptiesagent-manager/adds<target path>/.gitkeepwhen that path has neither akustomization.yamlnor a.gitkeepon the base branch. "Empties" is read from the plan (layout.Buildremovesagent-manager/kustomization.yaml); no listing..gitkeepat the repository's root, which no merge removes.commitLocation.content,sameLocation) and its ServiceAccount read of the organization namespace inownerLocationare removed: the rule needs no knowledge of the target's kind.agents.KeepContent, shared with the organization writes, no longer names an organization..gitkeepincommit.files.docs/organizations-commit-mode.mddescribe the rule.Flux builds a path with no YAML file as an empty kustomization and prunes the old inventory: fluxcd/pkg
kustomizev1.24.0 (kustomize-controller v1.7.3) generatesnamespace: _placeholderwith no resources for it, and source-controller's default ignore list keeps.gitkeep.Tests
TestCommitDeleteOfTheLastAgentKeepsItsTargetPath(the table test of #520, extended): a content path found through the F1 fallback and through the organization's own Kustomization, another Kustomization's path, a path the caller names, and the repository's root; no.gitkeepwith akustomization.yaml, with a.gitkeepalready in git, or with another agent left..gitkeep, the path does not stay).go build ./...,go testofinternal/agents,internal/apiandinternal/organizations, and pre-commit (golangci-lint included) pass.Review
Codex: round 1 on 023fdeb approved with no findings; round 2 skipped the small fixes, which the first reviewer confirmed.